package xyz.ieden.hello.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping(value = "hello")
public class HelloController {

    private static transient final Logger LOGGER = LoggerFactory.getLogger(HelloController.class);

    @GetMapping(value = "",produces = "text/plain;charset=UTF-8")
    public String hello(HttpServletRequest request) {
        LOGGER.info("请求路径：{}", request.getLocalAddr());
        return "Hello, World...";
    }
}
